export default {
    data () {
        return {
            isPlatformTenant: false, // 是否是平台运营者
            tenantList: [], // 租户列表
        }
    },
    created() {
        this.isPlatformTenant = parseInt(localStorage.getItem('is_plf_tenant'))
        if (this.isPlatformTenant) {
          this.formData && this.formData.push({ typeCode: "selectFilter", title: "租户名称", name: "tenant_id", jsName: "tenant", fnName: "tenantList", vname: "tenant_name" })
          this.getTenantList('')
        }
    },
    methods: {
        // 获取租户列表
        getTenantList(val) {
            this.$api.tenant.tenantList({ tenant_name: val, page: 1, page_size: 20 }).then(res => {
                this.tenantList = res.page_list || []
            })
        },
    }
}